package com.sir.tao.carhire.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sir.tao.carhire.dao.UserDao;
import com.sir.tao.carhire.entity.table.UserEntity;
import com.sir.tao.carhire.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author dyy
 * @data 2021/12/15 14:56
 * @description:
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements UserService {


    @Resource
    private UserDao userDao;


    @Override
    public int addUser(UserEntity user) {
        return userDao.addUser(user);
    }

    @Override
    public UserEntity selectUserByUserId(String userId) {
        return userDao.selectUserByUserId(userId);
    }

    @Override
    public int updateUser(UserEntity user) {
        return userDao.updateUser(user);
    }

    @Override
    public int deleteUser(String userId) {
        return userDao.deleteUser(userId);
    }


    @Override
    public UserEntity getUserByUserName(String userName) {
        return userDao.getUserByUserName(userName);
    }
}
